<?php
session_start();require('../conn.php');require('../functions.php');require('admin.php');$day=date("Y-m-d",time());if($_GET['do']=='del_referer_last'){$mysql->query("delete from `refererdata` where `day`!='{$day}'");echo '<script>alert(\'删除成功\');location.href=\'datasql.php\'</script>';exit;}if($_GET['do']=='del_kou_last'){$mysql->query("delete from `koudata` where `day`!='{$day}'");echo '<script>alert(\'删除成功\');location.href=\'datasql.php\'</script>';exit;}?>

<?php include('head.php')?>    	
    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php
 include('left.php');?>
<div class="span9">
            <h1 class="page-title">SQL管理</h1>
<!--			
<div class="btn-toolbar">
    <a href="#myModal" data-toggle="modal" class="btn">Delete</a>
  <div class="btn-group">
  </div>
</div>
-->
<div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#clean" data-toggle="tab">数据库清理</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="clean">	  
			<a class="btn btn-primary" href="?do=del_referer_last"><i class="icon-trash"></i> 删除历史访问数据</a>
			<a class="btn btn-primary" href="?do=del_kou_last"><i class="icon-trash"></i> 删除历史扣量数据</a>
			<!--
			<a class="btn btn-primary" href="?do=clean_debuglist"><i class="icon-trash"></i> 清空调试数据</a>
			-->
			<br /><br />
			<span>如数据内容大请耐心等待，建议一周左右删除一次，如果站点流量大可以适当缩短</span>
      </div>
      <div class="tab-pane fade" id="profile">
    <form id="tab2">
        <label>New Password</label>
        <input type="password" class="input-xlarge">
        <div>
            <button class="btn btn-primary">Update</button>
        </div>
    </form>
      </div>
  </div>

</div>

<div class="modal small hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Delete Confirmation</h3>
  </div>
  <div class="modal-body">
    
    <p class="error-text"><i class="icon-warning-sign modal-icon"></i>Are you sure you want to delete the user?</p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
    <button class="btn btn-danger" data-dismiss="modal">Delete</button>
  </div>
</div>

        </div>
    </div>
    

    
    <footer>
        <hr>
        
        <p class="pull-right"><!--power by right--></p>
        
        
        <p><!--power by --></p>
    </footer>
    

    

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="lib/bootstrap/js/bootstrap.js"></script>
	


  </body>
</html>